package com.hrbxlh.virtualization.pojo;

import org.apache.commons.lang3.builder.ToStringBuilder;

import java.util.Date;

public class Container {

    private Long id;

    /**
     * rancher中容器id
     */
    private String rancherId;

    /**
     * docker中容器id
     */
    private String dockerId;

    /**
     * 镜像id
     */
    private Long imageId;

    private Integer ip;

    /**
     * 容器状态，1：运行，2：停止
     */
    private Integer containerStatus;

    /**
     * 容器所属者工号
     */
    private String stuorteaId;

    /**
     * 课程id
     */
    private Integer courseId;

    /**
     * 章节id
     */
    private Integer chapterId;

    /**
     * 容器角色，0：单容器，1：集群主节点，2：集群第一个从节点，3：集群第二个从节点
     */
    private Integer containerRole;

    private Date createTime;

    private Date updateTime;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getRancherId() {
        return rancherId;
    }

    public void setRancherId(String rancherId) {
        this.rancherId = rancherId == null ? null : rancherId.trim();
    }

    public String getDockerId() {
        return dockerId;
    }

    public void setDockerId(String dockerId) {
        this.dockerId = dockerId == null ? null : dockerId.trim();
    }

    public Long getImageId() {
        return imageId;
    }

    public void setImageId(Long imageId) {
        this.imageId = imageId;
    }

    public Integer getIp() {
        return ip;
    }

    public void setIp(Integer ip) {
        this.ip = ip;
    }

    public Integer getContainerStatus() {
        return containerStatus;
    }

    public void setContainerStatus(Integer containerStatus) {
        this.containerStatus = containerStatus;
    }

    public String getStuorteaId() {
        return stuorteaId;
    }

    public void setStuorteaId(String stuorteaId) {
        this.stuorteaId = stuorteaId == null ? null : stuorteaId.trim();
    }

    public Integer getCourseId() {
        return courseId;
    }

    public void setCourseId(Integer courseId) {
        this.courseId = courseId;
    }

    public Integer getChapterId() {
        return chapterId;
    }

    public void setChapterId(Integer chapterId) {
        this.chapterId = chapterId;
    }

    public Integer getContainerRole() {
        return containerRole;
    }

    public void setContainerRole(Integer containerRole) {
        this.containerRole = containerRole;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this)
                .append("id", id)
                .append("rancherId", rancherId)
                .append("dockerId", dockerId)
                .append("imageId", imageId)
                .append("ip", ip)
                .append("containerStatus", containerStatus)
                .append("stuorteaId", stuorteaId)
                .append("courseId", courseId)
                .append("chapterId", chapterId)
                .append("containerRole", containerRole)
                .toString();
    }
}